'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
  //event为客户端上传的参数
  const db = uniCloud.database();
  const collection = db.collection('users');
  let new_characters=event.characters;
  let _id=event.user_id;
  let res = await collection.doc(_id).update({
	  characters: new_characters
});
  console.log('event : ' + event)
  //返回数据给客户端
  return {"status":2, "res":res};
};
